package tech.aistar.service;

import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tech.aistar.dto.AgentGrade;
import tech.aistar.entity.Agent;
import tech.aistar.entity.House;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: shuaiguo
 * @Date: 2020/09/28/21:06
 * @Description:
 */
public interface IAgentService {
    List<Agent> selectAll();

    List<AgentGrade> selectAgent();

    List<AgentGrade> selectAgentByName(String name);

    void insertAgent(Integer registerId,String identity);

    PageInfo<AgentGrade> findByPage(String name, Integer pageNow, Integer pageSize);
    void insert(Agent agent);
    void  updateByPrimaryKey(Agent agent);
    void deleteByPrimaryKey(Integer id);


    Agent selectById(Integer id);

    int updatephoneById(@Param("phone") String phone, @Param("id") Integer id);

    int updateNameById(@Param("name") String name,@Param("id") Integer id);

    int updategenderById(@Param("gender") String gender,@Param("id") Integer id);

    int updateIdentityById(@Param("iden") String identityCardNumber,@Param("id") Integer id);

    Agent selectByregisterId(Integer registerId);
}
